package com.jamesacurtis.MyBudget;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

public class MyBudgetMain extends Activity {
    /** Called when the activity is first created. */
public Button quickEx, addIncome, addExpense, summary, timeClock, settings, advance;
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        //setup buttons 
        setupbutton();
        
    }

	private void setupbutton() {
		quickEx = (Button)findViewById(R.id.quickexp);
		addIncome = (Button)findViewById(R.id.add_income);
		addExpense = (Button)findViewById(R.id.add_expense);
		summary = (Button)findViewById(R.id.summary);
		timeClock = (Button)findViewById(R.id.time_clock);
		settings = (Button)findViewById(R.id.settings);
		advance = (Button)findViewById(R.id.advance);
		
		addClickListeners();	
		
	}

	private void addClickListeners() {
		//add all click listeners for buttons
		   quickEx.setOnClickListener(new Button.OnClickListener() {
			    //TODO: add real action
			    public void onClick (View v){
                    
			    	Intent myIntent = new Intent(MyBudgetMain.this, QuickExpense.class);
			    	MyBudgetMain.this.startActivity(myIntent);
			    	//Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	
			   }
			  });
		   
		   addIncome.setOnClickListener(new Button.OnClickListener() {
			    //TODO: add real action
			    public void onClick (View v){
			    	
			    	Intent myIntent = new Intent(MyBudgetMain.this, AddIncome.class);
			    	MyBudgetMain.this.startActivity(myIntent);
			    	
			    	//Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	
 
			    }
			  });
	
		   addExpense.setOnClickListener(new Button.OnClickListener() {
			
			   public void onClick (View v){
			    	Intent myIntent = new Intent(MyBudgetMain.this, AddExpense.class);
			    	MyBudgetMain.this.startActivity(myIntent);
			    }
			  });
		   
		    summary.setOnClickListener(new Button.OnClickListener() {
			
			    public void onClick (View v){
			    	Intent myIntent = new Intent(MyBudgetMain.this, Summary.class);
			    	MyBudgetMain.this.startActivity(myIntent);
			    	
			    	
			    	//Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	
 
			    }
			  });
		   
		   settings.setOnClickListener(new Button.OnClickListener() {
			    //TODO: add real action
			    public void onClick (View v){
			    	Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	

			    }
			  });
		   
		   timeClock.setOnClickListener(new Button.OnClickListener() {
			    //TODO: add real action
			    public void onClick (View v){
			    	Intent myIntent = new Intent(MyBudgetMain.this, TimeClock.class);
			    	MyBudgetMain.this.startActivity(myIntent);
		    	//Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	

			    }
			  });
		   
		   advance.setOnClickListener(new Button.OnClickListener() {
			    //TODO: add real action
			    public void onClick (View v){
			    	Toast.makeText(MyBudgetMain.this, "NOT YET IMPLEMENTED", Toast.LENGTH_SHORT).show(); 	    	

			    }
			  });
		
	}
}